home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / syslock.arc / SYSLOCK.DOC < prev    next >
Text File  |  1985-12-05  |  16KB  |  366 lines

  1.  
  2.  
  3.  
  4.                                   SYSLOCK
  5.  
  6.                A Device Driver-Based Password Security System
  7.  
  8.                           Version 1.1, 8/24/85
  9.     All Rights Reserved: J. C. Kilday Associates, Peaks Island, ME 04108
  10.  
  11.  
  12. SYSLOCK is used to discourage unauthorized use of IBM PC's and compatibles.
  13. When the complete "system" is installed on an IBM XT, positive and absolute
  14. protection against unauthorized use of the machine is assured.  This protection
  15. can be bypassed only by a knowlegeable intruder opening up the XT box.
  16.  
  17.  
  18. Included in this package are the following files:
  19.  
  20.                 SYSLOCK.DOC - This documentation
  21.                 SYSLOCK.ASM - Assembler source code for the security
  22.                               device driver
  23.                 SYSLOCK.SYS - Assembled device driver, ready to use
  24.                 RELOCK.ASM  - Assembler source code for companion
  25.                               program
  26.                 RELOCK.COM  - Assembled companion program, ready to use
  27.  
  28. All rights to this system and its programs belong to:
  29.  
  30.                         J. C. Kilday Associates
  31.                         Central Avenue
  32.                         Peaks Island, ME 04108
  33.  
  34. You are granted a limited license to use, copy, and distribute SYSLOCK only
  35. under the following conditions:
  36.  
  37.         1) No fee is to be charged for copying and distribution
  38.  
  39.         2) SYSLOCK is distributed as a complete set of files as listed
  40.            above and all files are in their original, unmodified state.
  41.  
  42.  
  43. I have not had the opportunity to test this package on other than IBM PC's and
  44. XT's.  The simple, reversible hardware modification to the XT described herein
  45. may not be possible on other machines, although the software parts of this
  46. system will work.
  47.  
  48. I would appreciate hearing from users of SYSLOCK and would welcome any & all
  49. suggestions for improvement, identification of bugs (Heaven forbid!), and tips
  50. re: installation on other micros.  I may be contacted at the above address, or
  51. through messages left on FIDO 107/50, Wilmington, DE, 302-764-7522 (24 hrs), or
  52. Compuserve PCSIG 72307,2156.
  53.  
  54.                                         Jack Kilday
  55.                                         8/24/85
  56.  
  57.  
  58.  
  59.  
  60.  
  61. ABOUT SYSLOCK
  62.  
  63.  
  64. The only sure way of implementing password security on an IBM PC is through
  65. use of the device driver facilities first provided with release 2.0 of PC DOS.
  66. Other password schemes relying on batch files to invoke them may be bypassed
  67. by pressing Ctrl-Break as the batch file (usually AUTOEXEC.BAT) begins
  68. execution.
  69.  
  70. Processing of the CONFIG.SYS file (if it exists) on the boot disk cannot be
  71. prevented in the same manner.  If the installation code contained in the
  72. device drivers being installed per CONFIG.SYS disables Ctrl-Break, nothing
  73. short of Ctrl-Alt-Del can prevent the installation routines from doing their
  74. duty.  If SYSLOCK.SYS is named first in your CONFIG.SYS file, and it exists on
  75. the referenced disk and directory, its installation cannot be prevented at
  76. boot time.
  77.  
  78. As it is installed, SYSLOCK.SYS requests entry of the system password and locks
  79. up the system until the proper password has been entered.
  80.  
  81. SYSLOCK.SYS is designed as a dummy read-only character device driver.  Its code
  82. may be accessed by an application which opens the device and requests that a
  83. character be read.  This is how the program RELOCK.COM interfaces with it.
  84. By typing:  RELOCK <ENTER> the PC is locked up again, requesting entry of the
  85. system password.  One could leave the PC in this state and only someone hitting
  86. the power switch could destroy that carefully created RAMDISK environment.
  87. Ctrl-Alt-Del is disabled by RELOCK.COM.
  88.  
  89. Some security is thus provided for floppy-based systems and it is enhanced by
  90. installing SYSLOCK on all boot/system diskettes.
  91.  
  92. When considering security for an XT and its data, there is need to disable the
  93. automatic boot attempt from drive A.  A method for doing this is described in
  94. this documentation.
  95.  
  96. The remaining sections cover:
  97.  
  98.                         GETTING STARTED
  99.                         CHANGING THE SYSTEM PASSWORD
  100.                         INSTALLATION ON THE XT
  101.                         OPERATIONS IN THE XT's NEW ENVIRONMENT
  102.                         ACKNOWLEDGEMENT
  103.                         HISTORY OF REVISIONS
  104.  
  105.  
  106.  
  107.  
  108.  
  109. GETTING STARTED
  110.  
  111.  
  112. Executable forms of the 2 SYSLOCK programs are SYSLOCK.SYS and RELOCK.COM.
  113.  
  114. 1. Include the following statement in your CONFIG.SYS file:
  115.  
  116.                 device=syslock.sys
  117.  
  118.    In the event you have included other device drivers this one may be
  119.    referenced first as it is not dependent on any other driver being
  120.    installed (e.g., ANSI.SYS).
  121.  
  122. 2. Copy SYSLOCK.SYS to the root directory of the boot/system disk.
  123.  
  124. 3. Copy RELOCK.COM to a disk/directory included in your normal PATH.
  125.  
  126. 4. Reboot the system and enter the password "test" when prompted.
  127.    (You may change the password as described in the next section.)
  128.  
  129. 5. Test operation of RELOCK.COM by typing: RELOCK <ENTER>  .
  130.  
  131. SYSLOCK.SYS and RELOCK.COM are compatible with all application environ-
  132. ments I could think of during testing.  Use of the inter-application
  133. communications area and user interrupts were avoided so that RELOCK
  134. could always communicate with SYSLOCK when the DOS prompt is present.
  135. Use of the ANSI.SYS screen and keyboard enhancement device driver also
  136. was avoided since it is not always needed or compatible with all
  137. applications.  Version 1.1 provides enhancements preventing use of
  138. SideKick and perhaps other memory resident utilities to bypass the
  139. the password requirement of a RELOCKed machine.
  140.  
  141.  
  142.  
  143. CHANGING THE SYSTEM PASSWORD
  144.  
  145.  
  146. If you have the Macro Assembler (or Small Assembler) the password may be
  147. changed by making the modifications indicated in the SYSLOCK.ASM file
  148. provided and assembling and linking as described in that listing.
  149. Whether or not you have an assembler or work with assembler language,
  150. you may enjoy reviewing the commented source listings of SYSLOCK.ASM and
  151. RELOCK.ASM to see how they generally work.
  152.  
  153. Alternatively, you may easily change the password in the assembled code
  154. of SYSLOCK.SYS.  Sufficient space is reserved for a password of up to 15
  155. characters.  The password "test" may be replaced with one of your choosing
  156. by using DEBUG, the Norton Utilities, or other "zapper".  A sample session
  157. using DEBUG is presented on the next page.
  158.  
  159.  
  160.  
  161.  
  162. CHANGING THE SYSTEM PASSWORD (Continued)
  163.  
  164.  
  165. The sample DEBUG session  shown below demonstrates password changes directly
  166. to the assembled SYSLOCK.SYS device driver.
  167.  
  168. C>debug syslock.sys
  169. -d112 121
  170. xxxx:0112  04 74 65 73 74 20-20 20 20 20 20 20 20 20         .test
  171. xxxx:0120  20 20
  172. -a112
  173. xxxx:0112 dbe,'constantinople'
  174. xxxx:0121 ^C
  175.  
  176. -d112 121
  177. xxxx:0112  0E 63 6F 6E 73 74-61 6E 74 69 6E 6F 70 6C         .constantinopl
  178. xxxx:0120  65 20                                             e
  179. -w
  180. Writing nnnn bytes
  181. -q
  182.  
  183. This session includes the following steps:
  184.  
  185.       1) Type   debug syslock.sys <ENTER>   and the system responds with the
  186.          hyphen (-) prompt.
  187.  
  188.       2) Type   d112 121 <ENTER>   and the system responds with the display
  189.          similar to that shown above.  The first character after ...:112 is the
  190.          length of the present password (in hex).  The remaining 15 characters
  191.          comprise the password space.  The present password is displayed at the
  192.          right.
  193.  
  194.       3) Type   a112 <ENTER>   and after the response type   db    and a single
  195.          character indicating the length of your password (in hex: 1 thru 9, a,
  196.          b, c, d, e, or f).  In the example, a 14-character password is being
  197.          substituted for the word "test".  Now follow the length character with
  198.          a comma and single quote (,') and enter your password of no more than
  199.          15 characters.  Terminate the password with another single quote ('),
  200.          press <ENTER>, and then <CTRL>-<BREAK>.
  201.  
  202.       4) Check your work by typing   d112 121 <ENTER>   as done in the second
  203.          step.
  204.  
  205.       5) Now type   w <ENTER>    to write the modified SYSLOCK.SYS back to
  206.          disk from whence it came.
  207.  
  208.       6) Type     q <ENTER>     to terminate the DEBUG session.  The new
  209.          password will be effective after you next boot the system.
  210.  
  211.  
  212.  
  213. INSTALLATION ON THE XT
  214.  
  215. No password protection scheme alone can guarantee security on an IBM XT until
  216. its attempt to boot from drive A can be circumvented.  A procedure for doing
  217. this is described here.  No cutting of conductors or ROM changes are needed.
  218. The procedure takes less than 5 minutes and can be reversed as needed.
  219. It is applicable to an XT with one floppy disk drive and hard disk.  I don't
  220. know whether the same would apply to the AT or any other hard disk compatible.
  221. (Would like to hear from anyone having more info on this.)
  222.  
  223. 1. Remove the XT case and locate the flat ribbon signal connector to the floppy
  224.    servo board on the top of the drive.  Note that a group of 6 conductors have
  225.    been twisted, approximately 6 inches away from the connector.  This marks the
  226.    connector for drive A.  You will find a second ribbon cable connector and
  227.    cable without such a twist.  This is available for use with a 2nd drive if
  228.    installed.  On a standard XT one is not, so ....
  229.  
  230. 2. Make sure the power is off, remove the signal cable from the floppy drive
  231.    board and replace it with the signal cable without the twist.
  232.  
  233. 3. Now locate the switch block on the XT system board.  The normal settings for
  234.    a single installed floppy drive are switch 7 - ON and switch 8 - ON.  Turn
  235.    switch 7 to OFF.  This informs ROM BIOS that 2 floppy drives are installed.
  236.  
  237. 4. Replace the XT case and turn power on.
  238.  
  239. 5. After the usual memory check, you hear 2 beeps and see a "601" error report.
  240.    Also displayed is the message "(RESUME = "F1" KEY )".  The system cannot find
  241.    a drive A, but we'll get around that in a moment.  Press F1 and the normal
  242.    booting process is completed from drive C.
  243.  
  244. 6. The system treats the installed floppy drive as drive B.  In order to
  245.    restore the normal operating environment, issue the following command:
  246.  
  247.                              ASSIGN A=B
  248.  
  249.    Also insert this command in your AUTOEXEC.BAT file so that normal references
  250.    to the floppy drive may be as drive A.
  251.  
  252. 7. At this point your system should operate normally.  However, there are some
  253.    additional considerations involving the new environment of which you should
  254.    be aware.  These are discussed in the next section.
  255.  
  256. 8. If you have completed all steps and have installed and tested SYSLOCK.SYS
  257.    and RELOCK.COM as described earlier, you are ready to reboot the system.
  258.  
  259. Note that you always will receive the "601" error report and be required to
  260. press F1 to resume booting.  But since you already have decided to require entry
  261. of a password to enable booting, the inconvenience of pressing F1 before entry
  262. of the password really is insignificant.
  263.  
  264.  
  265.  
  266.  
  267. OPERATIONS IN THE XT's NEW ENVIRONMENT
  268.  
  269. The hardware modifications installed per the previous section result in the
  270. single disk drive being considered by ROM BIOS and DOS as physical drive B.
  271. The following considerations/conditions apply:
  272.  
  273. 1.Running Diagnostics - The IBM diagnostics diskette cannot be run successfully
  274.   unless the hardware modifications are reversed.
  275.  
  276. 2.Use of the ASSIGN command - If any of your batch files use this command
  277.   without drive specifiers (to restore ASSIGNments to "normal"), it must be
  278.   replaced with "ASSIGN A=B", which is the new "normal" state.
  279.  
  280. 3.Diskette Formatting - DOS will not format a diskette on a drive involved
  281.   in an ASSIGN command.  Thus in this new environment neither A nor B can be
  282.   used for formatting a diskette unless the following or similar technique is
  283.   employed:
  284.  
  285.       (Assumes the last ASSIGN executed is ASSIGN A=B)
  286.  
  287.       Create a batch file - FORMAT-A.BAT:
  288.  
  289.           ASSIGN            (Restores physical B = logical B)
  290.           FORMAT B: [parms] (Executes DOS FORMAT on diskette in the only floppy
  291.                                 drive)
  292.           ASSIGN A=B        (Restores the new "normal" assignment)
  293.  
  294. 4.Single drive operations - The COPY and DISKCOPY (and COMP) commands allow
  295.   execution on single drive systems operations between 2 physical diskettes.
  296.   Because we have modified the system through a switch setting now indicating a
  297.   2-drive system, the flip/flop designation of the single drive as A or B as
  298.   needed during COPY and DISKCOPY operations no longer is operational.  Alter-
  299.   native means, however, are available: DISKCOPYing from floppy to a suitable
  300.   RAMDISK, copying by filename to RAMDISK or the hard disk and back to a changed
  301.   diskette.  (An opportunity for some batch file creativity.)
  302.  
  303. If these differences to normal operations are too significant for your purposes
  304. and you require a degree of security that this software can provide, I am
  305. sure there are less easily reversed & irreversible hardware modifications
  306. possible.  As of this writing, however, I have not explored or considered any.
  307.  
  308.  
  309.  
  310.  
  311. ACKNOWLEDGEMENTS
  312.  
  313. In mid-June I came across the first meaningful attempt, in the public
  314. domain, to provide password security on PC's.  It is a package developed by
  315. John R. Petrocelli of Schenectady, N.Y., revised as of 4/30/85, and called
  316. PASSWRD4.  As it was represented as being device driver-based, I was quick
  317. to download it.
  318.  
  319. I was pleasantly surprised to find that it worked well and, in the right
  320. environment, was bug free.  At about the same time, I was disappointed to
  321. learn that my employer had spent hundreds of dollars for PC-LOCKS for
  322. XT's and that they are grossly ineffective.  That started the experimentation
  323. which led to the hardware change I have described here.  I am sure others
  324. may already know of it, but I sure couldn't find them when I needed them.
  325.  
  326. My experiments with PASSWRD4 pointed up additional needs of such a package:
  327.         -Remove any reliance on ANSI.SYS screen enhancements.  Some
  328.          applications (IRMA KEY is one) cannot get along with ANSI.SYS.
  329.         -Provide a means for RELOCKing the system through reactivation
  330.          of the device driver without using the "user" interrupt vectors
  331.          or inter-applications communications areas.  Some applications
  332.          have the nasty habit of not putting things back the way they
  333.          found them.
  334.  
  335. I decided to take on the writing of SYSLOCK and to dedicate it to the
  336. downfall of those hardware vendors who are making a buck off the
  337. ignorance of us PC users.  And what better way to dedicate it than to
  338. leave it in the public domain where I found some of the concepts it
  339. incorporates, thanks to John Petrocelli.
  340.  
  341.  
  342.                                       Jack Kilday
  343.  
  344.                                       8/24/85
  345.  
  346.  
  347.  
  348.  
  349. HISTORY OF REVISIONS
  350.  
  351.  
  352. Original Version - 7/7/85
  353.  
  354. Version 1.01     - 7/10/85  -Correction of RELOCK failure to properly exit
  355.                              after displaying "not installed" message when
  356.                              SYSLOCK.SYS device driver not installed.
  357.                             -Revisions and additional info added to doc.
  358.  
  359. Version 1.1      - 8/24/85  -Added capability to disable memory resident
  360.                              programs which could provide the means to bypass
  361.                              RELOCK function.  Tested OK with SideKick and
  362.                              should be effective with other programs using
  363.                              timer interrupts to reinstall vectors to local
  364.                              keyboard handlers.
  365.                             -Minor revisions to doc.
  366.